package com.ellwood.common.core.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.fhs.core.trans.vo.TransPojo;
import lombok.Data;

import java.util.Date;

/**
 * @ProjectName: Ellwood-framework-boot
 * @PackageName: com.ellwood.common.core.base
 * @ClassName: EntityBase
 * @Description: // 实体基类
 * @Author: Ellwood
 * @CreateDate: 2024/7/12 - 下午5:34
 * @Version: V1.0.0
 */
@Data
public class EntityBase implements TransPojo {

    @TableField(fill = FieldFill.INSERT, select = false)
    private Integer isState;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    // 创建者 // TODO 权限完成之后再进行配置自动填充
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    // 更新者 // TODO 权限完成之后再进行配置自动填充
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

}
